<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>
<%
	String path = request.getContextPath();
	String basepath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
	System.out.println("basepath:"+basepath);
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<base href="<%=basepath %>" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>订单页</title>
<script type="text/javascript" src="js/jquery-1.8.3.js" ></script>
<script type="text/javascript">

$(function(){
	
	//$.post("地址",{参数},function(data){},"json");
	
	$.ajax({
		type:"POST",
		url:"ac/findacc",
		data:{},
		success:function(data){
			//console.log(data);
			
			$.each(data,function(i,n){
				$("#accid").append("<option value='"+n.accid+"' >"+n.accid+"</option>");
			});
			
		}
	});
	
});


function showBalance(accid){
	
}


function paymoney(){
	payform.submit();
}
</script>
</head>
<body>
<h3>这里是book_order.jsp页面</h3>
<form name="payform" action="" method="post">
	<input type="hidden" value="${book.bookid }" name="bookid" id="bookid" />

书籍信息：<br/>
编号：${book.bookid }<br/>
书名：${book.bookName }<br/>
出版社：${book.publicDept }<br/>
价格：${book.bookPrice }<br/>
出版日期：${book.publicDate }<br/>
作者：${book.bookAuth }<br/>
图片：<img src="${book.imgPath }" height="200" border="1" />
<br/>
简介：${book.summary }<br/>
<hr/>
书籍库存数量：${count }<br/>
当前用户：${sessionScope.myuser.realname }<br/>
当前用户的账户：
	<select name="accid" id="accid" onchange="showBalance(this.value);">
		<option value="0">===请选择扣款账户===</option>
	</select>
	选择账户的余额为：<span id="balanceinfo"></span><br/>


<input type="button" value="支付" onclick="paymoney();" />
</form>
</body>
</html>